32BitLib is a library of assembler macros that can be used to create 32-bit safe software with the BBC BASIC assembler (under RISC OS 4 or higher only because support for the MSR/MRS instructions are needed in the assembler). The idea is that subroutines are generally assumed to be non-flag-preserving, so the return and exit macros do not attempt to restore the flags at all (except for the swiReturn... and swiExit... macros that can be used to create SWI exit code that restores the flags in 26-bit mode).